<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Function template find_executable</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../../../boost_process/v2.html#header.boost.process.v2.environment_hpp" title="Header &lt;boost/process/v2/environment.hpp&gt;">
<link rel="prev" href="home.html" title="Function template home">
<link rel="next" href="set_idm8165.html" title="Function set">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="home.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../../boost_process/v2.html#header.boost.process.v2.environment_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="set_idm8165.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.process.v2.environment.find_executable"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Function template find_executable</span></h2>
<p>boost::process::v2::environment::find_executable — Find the executable <code class="computeroutput">name</code> in an environment-like type. </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../../boost_process/v2.html#header.boost.process.v2.environment_hpp" title="Header &lt;boost/process/v2/environment.hpp&gt;">boost/process/v2/environment.hpp</a>&gt;

</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Environment <span class="special">=</span> <span class="identifier">current_view</span><span class="special">&gt;</span> 
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> 
  <span class="identifier">find_executable</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> name<span class="special">,</span> 
                  <span class="identifier">Environment</span> <span class="special">&amp;&amp;</span> env <span class="special">=</span> <span class="identifier">current</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.29.12.8.5.16.4"></a><h2>Description</h2>
<p>
The environment type passed in must be a range with value T that fulfills the following requirements:</p>
<p>For <code class="computeroutput">T value</code></p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>std::get&lt;0&gt;(value) must return a type comparable to <code class="computeroutput"><code class="computeroutput"><a class="link" href="key_view.html" title="Struct key_view">key_view</a></code></code>.</p></li>
<li class="listitem"><p>std::get&lt;1&gt;(value) must return a type convertible to <code class="computeroutput"><code class="computeroutput"><a class="link" href="value_view.html" title="Struct value_view">value_view</a></code></code>.</p></li>
</ul></div>
<p>
</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">env</code></span></p></td>
<td><p>The environment to search. Defaults to the current environment of this process</p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A filesystem::path to the executable or an empty path if it cannot be found. </p></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="copyright-footer">Copyright © 2006-2012 Julio M. Merino Vidal, Ilya Sokolov,
      Felipe Tanus, Jeff Flinn, Boris Schaeling<br>Copyright © 2016 Klemens D. Morgenstern<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="home.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../../boost_process/v2.html#header.boost.process.v2.environment_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="set_idm8165.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
